HTBasic Secure Utility

The SECURE utility processes an HTBasic PROG file for distribution to make it smaller and harder to reverse engineer. It removes most of the embedded program information, compresses the unused control table space, and sets the secure flag for all the program lines.  This makes it harder to reverse engineer a processed PROG file.

Each program or subprogram is read into memory one at a time, processed, and written to an output file.  The maximum main program or subprogram size that SECURE can process is approximately 570 Kbytes.

This utility removes the following embedded program information:

•	Variable names

•	I/O path names

•	Line label names

•	REM Statement text

•	!Comment text

The variable, I/O path, and line label names are removed and are set, by default, to 2 form-feed characters.  This can be disabled with the IOPath Names, Leave Labels, and Leave Variables options.  The Specify Hexadecimal Name Value option allows for speciation of a hexadecimal value of up to 8 digits in length to be used for the variable, I/O path, and line label names.

This utility does not remove the COM area, SUB subprogram, or DEF function names. The Scramble Remaining Names option scrambles any names that are not removed.  This allows COM area, SUB subprogram, and DEF function names to be obscured but to still function correctly.

WARNING:  Do not destroy the only copy of the original PROG file!  Once the variable, I/O path, and line label names have been removed there is NO way to restore them.

In case it is referenced by another program line, only the REM text is removed and the program line is left.  All ! Comments are removed from the end of all program lines except DATA statements.  This can be disabled with the Leave Comment Text option.  If the program does not branch to any REM or ! Comment lines the entire REM or ! Program line may be deleted with the Remove Comment Lines option.  If the REM or ! Comment line has a line label, only the comment text will be removed.

The secure flag is set for all program lines to make them unlistable. This is disabled with the Allow Program Listing option.

Use the following sequence to process an HTBasic PROG file.

1. Run HTBasic.
2. GET or LOAD all the program subprograms and functions into memory.
3. PRE-RUN the program by pressing the STEP or F1 function key
4. STORE or RE-STORE the program to disk.
5. Launch the SECURE program from the Tools menu with the desired options.

6. LOAD the new PROG file into memory.

The PROG file is now ready for distribution.